<!--
 * @Author: shawnXiao
 * @Date: 2021-12-18 19:54:33
 * @LastEditTime: 2021-12-19 21:10:02
 * @FilePath: /vue3-vite2-ts-antdv/src/views/Home/index.vue
-->
<template>
  <img
    alt="Vue logo"
    src="@/assets/logo.png"
  />
  <div class="box">
    {{person}}
    <div class="h1">herhrere测试测试3554445</div>
    <div class="h2">erherh数据68786</div>
  </div>
  <a-button type="primary">
    <template #icon>
      <!-- <SearchOutlined /> -->
    </template>
    Primary Button
  </a-button>
</template>

<script lang="ts">
import { defineComponent,reactive,ref,getCurrentInstance,onMounted } from 'vue'
import store from '@/store'

export default defineComponent({
  name: 'Home',
  components: {
  },
  setup() {
    let person = reactive({
      id:0,
      name:'',
      age:0
    })
    const app = getCurrentInstance()?.appContext.config.globalProperties;

    onMounted(async ()=>{
      console.log(store.getters['app/device'], store.getters)
    })

    return {person}
  }
})
</script>

<style lang="less" scoped>
.box {
  width: 100%;
  height: 100px;
  border: 1px solid #42b983;

  .h1 {
    color: red;
  }

  .h2 {
    color: blue;
  }
}
</style>
